<?php

class m140115_103343_crate_table_ratings extends CDbMigration
{
    const TABLE = 'ratings';

    public function up()
    {
        $this->createTable(self::TABLE, array(
            'id'               => 'pk',
            'user_id'          => 'int not null',
            'rating'           => 'int not null',
            'create_time'      => 'timestamp null default null',
            'update_time'      => 'timestamp null default null',
        ));
    }

    public function down()
    {
        $this->dropTable(self::TABLE);
    }
}
